/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package ua.i.kotionokyurievna.jewelryweb.controllers;

import java.util.ArrayList;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import ua.i.kotionokyurievna.jewelryweb.entities.Client;
import ua.i.kotionokyurievna.jewelryweb.entities.OrderC;
import ua.i.kotionokyurievna.jewelryweb.entities.OrderStatus;

/**
 *
 * @author kotionokyurievna
 */
@ManagedBean
@RequestScoped
public class ManagerPanelController {
    private List<OrderC> orders;
    
    /**
     * Creates a new instance of ManagerPanelController
     */
    public ManagerPanelController() {
    }
    
    public List<Client> getClients(){
        List<Client> clients = new ArrayList<Client>();
        for ( OrderC order: orders){
            clients.add(order.getClient());
        }
        return clients;
    }
    
    public List<Integer> getOrderIds(){
        List<Integer> orderIds = new ArrayList<Integer>();
        for ( OrderC order: orders){
            orderIds.add(order.getOrderId());
        }
        return orderIds;
    }
    
    public List<OrderStatus> getOrderStatus(){
        List<OrderStatus> ordersStatus = new ArrayList<OrderStatus>();
        for ( OrderC order: orders){
            ordersStatus.add(order.getOrderStatus());
        }
        return ordersStatus;
    }
    
    public void saveChanges(){
        
    }
}
